{% extends 'mote.html' %}
{% block asset %}
 <div class="table-responsive">
            <a href="{% url 'lab_add' %}"><button class=" btn btn-info">添加</button></a>
<table class="table table-bordered table-striped">
    <thead>
    <tr class="info">
     <th>id</th>
        <th>实验室名称</th>
        <th>楼层</th>
        <th>房间号</th>
        <th>负责人</th>
        <th>操作</th>
     </tr>
    </thead>
    <tbody>

    {% for foo in lab_all %}
        <tr>
            <td>{{ forloop.counter }}</td>
            <td>{{ foo.name }}</td>
            <td>{{ foo.floor }}</td>
            <td>{{ foo.room }}</td>
            <td>{% for fo in foo.username.all %}
                {{ fo.user }}
            {% endfor %}
            </td>
        <td>
             <button id="Lab"  name="{{ foo.id }}" class="ajax btn btn-danger">删除</button>
            <a href="/lab_edit/?id={{ foo.id }}"><button class="btn btn-primary">编辑</button></a>
            </td>
        </tr>
    {% endfor %}


    </tbody>
</table>
 </div>>
{% endblock %}
{% block k2 %}
    class="active"
{% endblock %}